package com.company.huisuo.biz.dialog

import android.annotation.SuppressLint
import android.app.Activity
import com.company.huisuo.R
import com.company.huisuo.base.BaseCenterPopupView
import com.company.huisuo.databinding.DialogSelectPayTypeBinding

/**
 * 选择支付方式
 */
@SuppressLint("ViewConstructor")
class SelectPayTypeDialog(
    activity: Activity, val scanOnclick: () -> Unit, val memberClick: () -> Unit
) : BaseCenterPopupView<DialogSelectPayTypeBinding>(
    activity
) {

    override val getLayoutId: Int
        get() = R.layout.dialog_select_pay_type

    override val getViewBinding: DialogSelectPayTypeBinding
        get() = DialogSelectPayTypeBinding.bind(contentView)

    override fun initData() {
        mBinding.ivClose.setOnClickListener {
            dismiss()
        }
        mBinding.tvScan.setOnClickListener {
            scanOnclick.invoke()
            dismiss()
        }
        mBinding.tvMember.setOnClickListener {
            memberClick.invoke()
            dismiss()
        }
    }
}